
var wsk = [
    "wsk"
];
$(function () {
    var $search = $("#search");
 /*   $search.bind("input propertychange", function () {
        var text = $(this).val();
        $.ajax({
            url: '/getMovieName',
            type: 'post',
            dataType: 'JSON',
            data: {name: text, start: 1},
            success: function (data) {
                var result = data;
                for (var i = 0; i < result.length; i++) {
                    wsk[i] = result[i].name;
                }
                $search.autocomplete({
                    source: wsk
                });
            }
        });
    });*/

    $('img.search_movie').click(function () {
        var text = $search.val();
        if (text == "" || text == null) {
            alert("请输入搜索的内容！！");
            return;
        }
        var $searchMovie = $("#searchMovie");
        $searchMovie.submit();
    });

    $('img.search_publish').click(function () {
        var text = $search.val();
        if (text == "" || text == null) {
            alert("请输入搜索的内容！！");
            return;
        }
        var $searchMovie = $("#searchMovie");
        $searchMovie.submit();
    });



});